import request from '../utils/request';
import { remoteAddress } from './ip';

export async function addStudent(params) {
  return request(remoteAddress('/student/center/add'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function deleteStudent(params) {
  return request(remoteAddress('/student/center/delete'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editStudent(params) {
  return request(remoteAddress('/student/center/update'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function queryStudent(params) {
  return request(remoteAddress('/student/center/listall'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editPassword(params) {
  return request(remoteAddress('/center/password/edit'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
